
public class FinalVarRefTest 
{
	final int x =10;
	int y;
	// blank final field may not have been initialised.
	// final int y;
	public int getX()
	{
		return x;
	}
	public int getY()
	{
		return y;
	}
	public void setX(int z)
	{
		// can't modify final once it is explicitly initialised
		//this.x=z;
	}
	public void setY(int z)
	{
		this.y=z;
	}
	public static void main(String[] args) 
	{
		FinalVarRefTest vrt = new FinalVarRefTest();
		System.out.println(vrt.getX());
		System.out.println(vrt.getY());
		
		vrt.setX(25);
		vrt.setY(34);
		System.out.println(vrt.getX());
		System.out.println(vrt.getY());
		
		
	}

}
